{extend name="layout/xilujob"}
{block name="header"}
<div class="navbar">
    <div class="container">
        <div class="nav_city">
            <div class="city fl">
                <div class="clearfix"><span class="city_name single-line">{$current_city.shortname|htmlentities}</span><span class="city_change">【切换城市】</span>
                </div>
                <ul class="city_select_menu" style="display:none;">
                    {foreach $site_cities as $item}
                    <li><a style="display:block;width:100%;color:black;" href="{:url('common/switch_city',['city_id'=>$item.city_id])}">{$item.city_name|htmlentities}</a> </li>
                    {/foreach}
                </ul>
            </div>

        </div>
        {if !$user}
        <p class="fl">欢迎登录贤聘网，本地区专业人才招聘网站！请 <a href="{:url('index/index')}" class="link">登录</a>/<a href="{:url('user/register')}" class="link">注册</a></p>
        {else}
        <div class="nav_user">
            <div class="nav_user_con"><a href="{:url('ucenter/home')}"><i class="Yicon"></i><span class="single-line" style="color:#fff;">{$user.nickname|htmlentities}</span></a></div>
            <ul class="nav_user_list" style="display: none;">
                {if $user->group_id==1}
                <li><a href="{:url('my_resume/index')}">我的简历</a></li>
                <li><a href="{:url('ucenter/view_me_personal')}">谁看过我</a></li>
                <li><a href="{:url('ucenter/my_applies')}">我的申请</a></li>
                {elseif $user->group_id==4}
                <li><a href="{:url('ucenter/course_manage')}">培训管理</a></li>
                <li><a href="{:url('ucenter/view_me_enterprise')}">谁看过我</a></li>
                <li><a href="{:url('ucenter/course_signups')}">课程报名</a></li>
                {else}
                <li><a href="{:url('job_manage/index')}">发布管理</a></li>
                <li><a href="{:url('ucenter/view_me_enterprise')}">谁看过我</a></li>
                <li><a href="{:url('ucenter/job_applies')}">应聘简历</a></li>
                {/if}
                <li><a href="{:url('ucenter/switch_group')}">切换身份</a></li>
                <li><a href="{:url('user/logout')}">退出账号</a></li>
            </ul>
        </div>
        {/if}
        <ul class="nav_list">
            <li><a href="{:url('index/index')}"><i class="Yicon i1"></i>网站首页</a></li>
            <!--            <li><a href="javascript:;"><i class="Yicon i2"></i>手机访问</a></li>-->
            <!--            <li><a href="javascript:;"><i class="Yicon i3"></i>帮助中心</a></li>-->
            <li><a href="{:url('hr_assist/index')}"><i class="Yicon i4"></i>HR工具箱</a></li>
            <li><a href="{:url('news/index')}"><i class="Yicon i5"></i>职场资讯</a></li>
        </ul>
    </div>
</div>
{/block}
{block name="ucenter"}

{/block}
{block name="one_content"}

<style>
    .index-swiper {
        width: 681px;
        height: 428px;
    }

    .index-swiper img{
        width:100%;
    }

    .index-swiper .swiper-slide {
        width: 681px;
        height: 428px;
        display: block;
    }

    .index_notice_con .swiper-container2 {
        width: 260px;
        margin-left: 0;
    }

    .index_notice_con .swiper-slide {
        width: 100%;
        font-size: 18px;
        color: #333;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .index_notice_con .swiper-button-next,
    .index_notice_con .swiper-button-prev {
        width: 21px;
        height: 21px;
        border-radius: 2px;
        background-image: url('__CDN__/assets/images/icon.png');
        background-size: 600px 600px;
        background-repeat: no-repeat;
        background-color: #ff7100;
        margin-top: -10.5px;
    }

    .index_notice_con .swiper-button-next {
        background-position: -106px -94px;
        right: -60px;
    }

    .index_notice_con .swiper-button-prev {
        background-position: -121px -94px;
        right: -34px;
        left: auto;
    }

    .index_notice_con .swiper-button-next.swiper-button-disabled,
    .index_notice_con .swiper-button-prev.swiper-button-disabled {
        background-color: #ebebeb;
        opacity: 1;
    }

    .index_notice_con .swiper-button-next.swiper-button-disabled {
        background-position: -151px -94px;
    }

    .index_notice_con .swiper-button-prev.swiper-button-disabled {
        background-position: -137px -94px;
    }
</style>

<div class="nav_header index_nav_header">
    <div class="container">
        <a href="javascript:" class="nav_header_logo"><img src="__CDN__/assets/images/logo.png" alt="" class="logo"></a>
        <div class="nav_header_main">
            <div class="header_search clearfix">
                <form id="search-form" action="{:url('job/index')}">
                    <div class="search_select">
                        <div class="search_select_title"><span>找工作</span><i class="Yicon icon_arrow_d1"></i></div>
                        <ul class="search_select_menu" style="display:none;">
                            <li data-url="{:url('job/index')}">找工作</li>
                            <li data-url="{:url('resume/index')}">招人</li>
                        </ul>
                    </div>
                    <input autocomplete="off" name="q" type="text">
                    <button class="search_btn"><i class="Yicon icon_search_w"></i>搜索</button>
                </form>
                {if $qs}
                <div class="header_search_select" style="display:none;">
                    <p class="plr15">猜你要搜</p>
                    <ul class="header_search_menu">
                        {foreach $qs as $q}
                        <li><a data-q="{$q|htmlentities}" href="javascript:">{$q|htmlentities}</a></li>
                        {/foreach}
                    </ul>
                </div>
                {/if}
            </div>
        </div>
        <div class="nav_header_ewm">
            <img src="{:cdnurl(config('site.minapp_qrcode'))}" alt="" class="imgm">
        </div>
    </div>
</div>
<div class="header_menu header_menu1">
    <div class="container clearfix">
        <div class="classify"><i class="Yicon"></i>全部职位分类</div>
        <!--        <a href="javascript:" class="clearfix fr more_service">更多服务<i class="Yicon icon_arrow_d"></i></a>-->
        <div class="fr more_service">
            <a href="javascript:;" class="clearfix menu-service">更多服务<i class="Yicon icon_arrow_d"></i></a>
            <div class="menu_select" style="display:none;">
                <a href="{:url('discover/index')}">发现</a>
                <a href="{:url('news/index')}">新闻资讯</a>
            </div>
        </div>
        <ul class="header-menu-list clearfix" style="float:none;">
            <li class="menu-list-item active"><a href="{:url('index/index')}">首页</a></li>
            <li class="menu-list-item"><a href="{:url('job/index')}">全部职位</a></li>
            <li class="menu-list-item"><a href="{:url('resume/index')}">人才专区</a></li>
            <li class="menu-list-item"><a href="{:url('job_fair/index')}">招聘会</a></li>
            <li class="menu-list-item"><a href="{:url('help/renshi')}">人事服务</a></li>
            <li class="menu-list-item"><a href="{:url('course/index')}">培训专区</a></li>
            <!--            <li class="menu-list-item"><a href="{:url('discover/index')}">发现</a></li>-->
        </ul>

    </div>

</div>
<!-- 头部end -->

<!-- 主体 -->
<div class="main bgf8">
    <div class="container">
        <div class="index_main clearfix">
            <div class="index_job-nav">
                <ul>
                    {foreach $job_categories as $i=>$first_category}

                    <li class="job-nav_li">
                        <div class="job-nav_title">{$first_category.category_name|htmlentities}</div>
                        <div class="job-nav_pop" style="display:none;">
                            <div class="job-nav_pop_wrapper">
                                {foreach $first_category.childlist as $second_category}
                                <div class="job-nav_pop_title">{$second_category.category_name|htmlentities}</div>
                                <div class="job-nav_pop_list clearfix">
                                    {foreach $second_category.childlist as $third_category}
                                    {if $user&&$user.group_id!=1}
                                    <a href="{:url('resume/index')}?q={$third_category.category_name|urlencode|htmlentities}"
                                       class="job-nav_list_item">{$third_category.category_name|htmlentities}</a>
                                    {else}
                                    <a href="{:url('job/index')}?q={$third_category.category_name|urlencode|htmlentities}"
                                       class="job-nav_list_item">{$third_category.category_name|htmlentities}</a>
                                    {/if}
                                    {/foreach}
                                </div>
                                {/foreach}
                            </div>
                        </div>
                    </li>

                    {/foreach}
                </ul>
            </div>
            <div class="index_center">
                <div class="index_marquee">
                    <div class="marquee_title">{$login_count|htmlentities}人在线</div>
                    <div class="marquee_con">
                        <marquee behavior="scroll" direction="left" scrollamount="5">
                            <p class="marquee_item">某小姐 刷新了简历</p>
                            <p class="marquee_item">某先生 投递了简历</p>
                            <p class="marquee_item">某先生 投递了简历</p>
                            <p class="marquee_item">某小姐 刷新了简历</p>
                            <p class="marquee_item">某先生 刷新了简历</p>
                            <p class="marquee_item">某先生 投递了简历</p>
                            <p class="marquee_item">某先生 投递了简历</p>
                            <p class="marquee_item">某先生 刷新了简历</p>
                            <p class="marquee_item">某小姐 刷新了简历</p>
                            <p class="marquee_item">某先生 刷新了简历</p>
                            <p class="marquee_item">某小姐 刷新了简历</p>
                        </marquee>
                    </div>
                </div>
                <!-- 轮播 -->
                <div class="index-swiper">
                    <div class="swiper-container swiper-container1">
                        <div class="swiper-wrapper">
                            {foreach $banners as $banner}
                            <a href="{$banner.url|htmlentities}" class="swiper-slide">
                                <img data-src="{$banner.image|htmlentities}" alt="" class="swiper-lazy">
                                <div class="swiper-lazy-preloader"></div>
                            </a>
                            {/foreach}
                        </div>
                    </div>
                </div>
            </div>
            {if !$user}
            <div class="index_personal-login">
                <div class="personal-login_tab">
                    <div class="personal-login_tab_item active">求职者登录</div>
                    <div class="personal-login_tab_item">企业登录</div>
                </div>
                <!-- 求职者登录 -->
                <form id="personal-form" method="post" action="{:url('user/login')}" class="personal-login_tab_con">
                    <!-- 用户名密码登录 -->
                    <div id="personal-account-login" class="personal-login_input personal-login_input_yzm">
                        <input name="account" data-rule="required(#personal-account-login:visible);length(3~20);" data-target="#nouse" data-msg="请填写邮箱/用户名" type="text" placeholder="邮箱/用户名">
                        <input name="password" data-rule="required(#personal-account-login:visible);length(3~20)" data-target="#nouse" data-msg="请输入密码" type="password" placeholder="请输入密码">
                    </div>
                    <!-- 验证码登录 -->
                    <div id="personal-mobile-login" class="personal-login_input personal-login_input_yhm" style="display:none;">
                        <input name="mobile" data-rule="required(#personal-mobile-login:visible);mobile;" data-msg="请输入手机" type="text" placeholder="手机">
                        <div class="pr mb13">
                            <input name="captcha" data-rule="required(#personal-mobile-login:visible);length(4)" data-msg-required="请输入验证码" type="text" maxlength="4" placeholder="请输入验证码">
                            <button type="button" href="{:url('/api/sms/send')}" class="get">获取验证码</button>
                            <button class="time" style="display:none;">59s</button>
                        </div>
                    </div>
                    <div class="clearfix">
                        <label class="choice_box">
                            <input name="keeplogin" type="checkbox">
                            <div class="choice">自动登录</div>
                        </label>
                        <a href="javascript:" class="personal-login_yzm">验证码登录</a>
                        <a href="javascript:" class="personal-login_yhm" style="display:none;">邮箱登录</a>
                    </div>
                    <button class="btn" id="personal-login">登录</button>
                    <a href="{:url('user/resetpwd')}" class="personal-login_link">忘记密码?</a>
                    <div class="btn_box clearfix">
                        <a href="{:url('user/register')}" class="btn1">注册简历</a>
                        <a href="{:url('user/register')}" class="btn1">企业注册</a>
                    </div>
                </form>
                <!-- 企业登录 -->
                <form id="enterprise-form" method="post" action="{:url('user/login')}" class="personal-login_tab_con" style="display:none;">
                    <input type="hidden" name="is_enterprise" value="1" />
                    <!-- 用户名密码登录 -->
                    <div id="enterprise-account-login" class="personal-login_input personal-login_input_yzm">
                        <input name="account" data-rule="required(#enterprise-account-login:visible);enterprise_account" data-msg-required="请输入邮箱/用户名" type="text" placeholder="邮箱/用户名">
                        <input name="password" data-rule="required(#enterprise-account-login:visible);enterprise_password" data-msg-required="请输入密码" type="password" placeholder="请输入密码">
                    </div>
                    <!-- 验证码登录 -->
                    <div id="enterprise-mobile-login" class="personal-login_input personal-login_input_yhm" style="display:none;">
                        <input name="mobile" data-rule="required(#enterprise-mobile-login:visible);enterprise_mobile" data-msg-required="请输入手机" type="text" placeholder="手机">
                        <div class="pr mb13">
                            <input name="captcha" data-rule="required(#enterprise-mobile-login:visible);enterprise_captcha" data-msg-required="请输入验证码" type="text" maxlength="4" placeholder="请输入验证码">
                            <button type="button" href="{:url('/api/sms/send')}" class="get">获取验证码</button>
                            <button class="time" style="display:none;">59s</button>
                        </div>
                    </div>
                    <div class="clearfix">
                        <label class="choice_box">
                            <input name="keeplogin" type="checkbox">
                            <div class="choice">自动登录</div>
                        </label>
                        <a href="javascript:"  class="personal-login_yzm">验证码登录</a>
                        <a href="javascript:" class="personal-login_yhm" style="display:none;">邮箱登录</a>
                    </div>
                    <button class="btn" id="enterprise-login">登录</button>
                    <a href="{:url('user/resetpwd')}" class="personal-login_link">忘记密码?</a>
                    <div class="btn_box clearfix">
                        <a href="{:url('user/register')}" class="btn1">注册简历</a>
                        <a href="{:url('user/register')}" class="btn1">企业注册</a>
                    </div>
                </form>
                <!-- 其他方式登录 -->
                <div class="personal-login_other">
                    <a href="javascript:" class="personal-login_other_item"><i class="Yicon i1"></i>微信</a>
                    <a href="javascript:" class="personal-login_other_item"><i class="Yicon i2"></i>扫码</a>
                </div>
            </div>
            <div style="display: none;"><img id="minapp-img" src="{:cdnurl(config('site.minapp_qrcode'))}" ></div>
            {else}
            <div class="index_logined">
                <div class="info">
                    <a href="{:url('ucenter/home')}" class="tx_box" style="background-image: url('{$user.avatar|alioss_format=100,100}');"></a>
                    <p href="{:url('ucenter/home')}" class="name">Hi,{$user.nickname|htmlentities}</p>
                    <p>欢迎您，{:date('A')=='AM'?'上午':'下午'}好</p>
                </div>
                {if $user.group_id==1}
                <!-- 用户登录 -->
                <a href="{:url('ucenter/view_me_personal')}" style="display:block;" class="view_num">
                    <p class="mb5"><span class="num">{:db('resume_view_log')->alias('l')->join('company_profile c','l.user_id=c.id')->where('viewed_at','>', time()-30*3600*24)->where('user_id',$user.id)->count()}</span>家</p>
                    <p>企业看过</p>
                </a>
                <div class="clearfix">
                    {if $resume}
                    <a href="javascript:;" id="btn-refresh-resume" data-id="{$resume.id|htmlentities}" class="logined-link">
                        <img src="__CDN__/assets/images/icon1.png">
                        <p>刷新简历</p>
                    </a>
                    <a href="{:url('my_resume/index')}" class="logined-link">
                        <img src="__CDN__/assets/images/icon2.png">
                        <p>我的简历</p>
                    </a>
                    {else}
                    <a href="{:url('my_resume/index')}" class="logined-link">
                        <img src="__CDN__/assets/images/icon1.png">
                        <p>刷新简历</p>
                    </a>
                    <a href="{:url('ucenter/home')}" class="logined-link">
                        <img src="__CDN__/assets/images/icon2.png">
                        <p>我的简历</p>
                    </a>
                    {/if}
                </div>
                {elseif $user.group_id==2}
                <!-- 企业登录 -->
                <a href="{:url('ucenter/job_applies')}" style="display:block;" class="view_num">
                    <p class="mb5"><span class="num">{:db('job_apply')->where('company_id', $user.id)->count('distinct user_id')}</span>人</p>
                    <p>投递简历</p>
                </a>
                <div class="clearfix">
                    <a href="{:url('job_manage/index')}" class="logined-link">
                        <img src="__CDN__/assets/images/icon3.png">
                        <p>发布管理</p>
                    </a>
                    <a href="{:url('ucenter/notification')}" class="logined-link">
                        <img src="__CDN__/assets/images/icon4.png">
                        <p>消息中心</p>
                    </a>
                </div>
                {elseif $user.group_id==3}
                <!-- 劳动店铺 -->
                <a href="{:url('ucenter/job_signups')}" style="display:block;" class="view_num">
                    <p class="mb5"><span class="num">{$stat.job_signup_count|htmlentities}</span>人</p>
                    <p>报名</p>
                </a>
                <div class="clearfix">
                    <a href="{:url('job_manage/index')}" class="logined-link">
                        <img src="__CDN__/assets/images/icon3.png">
                        <p>发布管理</p>
                    </a>
                    <a href="{:url('ucenter/notification')}" class="logined-link">
                        <img src="__CDN__/assets/images/icon4.png">
                        <p>消息中心</p>
                    </a>
                </div>
                {elseif $user.group_id==4}
                <!-- 培训机构 -->
                <a href="{:url('ucenter/course_signups')}" style="display:block;" class="view_num">
                    <p class="mb5"><span class="num">{:db('course_signup')->alias('s')->join('course c','s.course_id=c.id')->where('c.trainer_id', $user.id)->count('distinct user_id')}</span>人</p>
                    <p>已报名</p>
                </a>
                <div class="clearfix">
                    <a href="{:url('ucenter/course_manage')}" class="logined-link">
                        <img src="__CDN__/assets/images/icon5.png">
                        <p>培训管理</p>
                    </a>
                    <a href="{:url('ucenter/notification')}" class="logined-link">
                        <img src="__CDN__/assets/images/icon4.png">
                        <p>消息中心</p>
                    </a>
                </div>
                {/if}
            </div>
            {/if}
        </div>
        <!-- 公告 -->
        <div class="index_notice">
            <div class="index_notice_logo"><img src="__CDN__/assets/images/notice_logo.png" alt=""></div>
            <div class="index_notice_con">
                <div class="swiper-button-next"></div>
                <div class="swiper-button-prev"></div>
                <div class="swiper-container swiper-container2">
                    <div class="swiper-wrapper">
                        {foreach $news_banners as $news}
                        <a href="{:url('news/detail',['id'=>$news.id])}" class="swiper-slide">{$news.title|htmlentities}</a>
                        {/foreach}
                    </div>
                </div>
            </div>
            <a href="{:url('news/index')}" class="index_notice_more">更多公告 <i class="Yicon i1"></i> </a>
        </div>

            <div class="box info-box_right">
                <div class="box-tit">
                    <a href="{:url('discover/index')}">
                        <p class="title">热门话题</p>
                        <div class="box-right">
                            <i class="Yicon icon_arrow-r"></i>
                        </div>
                    </a>
                </div>
                <div class="box-con">
                    <a href="{:url('discover/index')}" class="img_box"><img src="__CDN__/assets/images/img5.png" alt="" class="imgm"></a>
                </div>
            </div>
        </div>
    </div>
</div>
<div id="nouse"></div>
<!-- 返回顶部 -->
<div class="backTop" style="display:none"><img src="__CDN__/assets/images/backTop.png"></div>

{/block}